
#pragma once


namespace __OCF_STUB__ 
{


using namespace __OCF_BASE__;

#define MAX_CHANNEL_INPUT	(10)
#define MAX_CHANNEL_NAME	(80)


#pragma pack(1)

typedef struct
{
	USHORT m_uiServerID;
	LONG m_lUsers;
	char m_achChannelName[MAX_CHANNEL_NAME];
}_CHANNEL_INFO_T;

#pragma pack()


#define __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__

template <class IF>
class CGwToLogin
{
	typedef TYPE_LIST09(BYTE,BYTE*,ULONG,ULONG*,USHORT,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnKeyCheck__ = 1,

		__END__
	};
	typedef IF _N_IF_T;
	typedef long (CGwToLogin<_N_IF_T>::*_FUNC_T)(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn);

public:
	CGwToLogin(_N_IF_T* pcIf)
		:m_pcIf(pcIf)
	{
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#endif
	}
	virtual ~CGwToLogin()
	{
	}
	CGwToLogin& operator =(const CGwToLogin& cFrom)
	{
		m_pcIf = cFrom.m_pcIf;
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#endif

		return *this;
	}
	long StubDispatch()
	{
		CIn<_OCF_PROXYSTUB_TYPELIST_T> cIn(m_ulLenRcvBuff, m_pRcvBuff);
		USHORT uiCmd;

		if (FALSE == cIn.Pop(uiCmd).IsValid())
		{
			return -2;
		}
		if (uiCmd >= __END__)
		{
			return -3;
		}
		if (NULL == m_apcFunc[uiCmd])
		{
			return -4;
		}
		return (this->*m_apcFunc[uiCmd])(cIn);
	}

public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetStubInfo(ULONG ulLenRcvBuff, const void* pRcvBuff, ULONG ulLenSndBuff = 0, void* pSndBuff = NULL) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }

#else
	inline void SetStubInfo(ULONG ulLenRcvBuff, const void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }

#endif
private:
	long fnKeyCheck(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn_A3C01056_FD2D_4800_912C_69683F47B599_)
	{
		ULONG ulBindX;ULONG ulIdentity;ULONG ulKey;BYTE byRes;
		if (FALSE == cIn_A3C01056_FD2D_4800_912C_69683F47B599_.Pop(ulBindX).Pop(ulIdentity).Pop(ulKey).IsValid()) return -1;
		long _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_ = m_pcIf->fnKeyCheck(ulBindX,ulIdentity,ulKey,byRes);
		if (0 != _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_) return _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_;
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_19DB7D7A_2FBD_49c7_873C_9603A9FC0050_(m_ulLenSndBuff, m_pSndBuff);
		if (FALSE == cTmpOut_19DB7D7A_2FBD_49c7_873C_9603A9FC0050_.Push(static_cast<USHORT>(1)).Push(byRes).IsValid()) return -2;
		return m_pcIf->SendResult(cTmpOut_19DB7D7A_2FBD_49c7_873C_9603A9FC0050_.GetDataLength(), cTmpOut_19DB7D7A_2FBD_49c7_873C_9603A9FC0050_.GetStartDataPtr());
	}

private:
	static _FUNC_T m_apcFunc[__END__];
	_N_IF_T* m_pcIf;
	ULONG m_ulLenRcvBuff;
	const void* m_pRcvBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#endif
};

template <class IF>
typename CGwToLogin<IF>::_FUNC_T CGwToLogin<IF>::m_apcFunc[__END__] = {
	NULL,
	&CGwToLogin<IF>::fnKeyCheck,
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__


template <class IF>
class CLoginToGw
{
	typedef TYPE_LIST09(BYTE,BYTE*,ULONG,ULONG*,USHORT,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnKeyCheckReturn__ = 2,

		__END__
	};
	typedef IF _N_IF_T;
	typedef long (CLoginToGw<_N_IF_T>::*_FUNC_T)(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn);

public:
	CLoginToGw(_N_IF_T* pcIf)
		:m_pcIf(pcIf)
	{
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#endif
	}
	virtual ~CLoginToGw()
	{
	}
	CLoginToGw& operator =(const CLoginToGw& cFrom)
	{
		m_pcIf = cFrom.m_pcIf;
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#endif

		return *this;
	}
	long StubDispatch()
	{
		CIn<_OCF_PROXYSTUB_TYPELIST_T> cIn(m_ulLenRcvBuff, m_pRcvBuff);
		USHORT uiCmd;

		if (FALSE == cIn.Pop(uiCmd).IsValid())
		{
			return -2;
		}
		if (uiCmd >= __END__)
		{
			return -3;
		}
		if (NULL == m_apcFunc[uiCmd])
		{
			return -4;
		}
		return (this->*m_apcFunc[uiCmd])(cIn);
	}

public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetStubInfo(ULONG ulLenRcvBuff, const void* pRcvBuff, ULONG ulLenSndBuff = 0, void* pSndBuff = NULL) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }

#else
	inline void SetStubInfo(ULONG ulLenRcvBuff, const void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }

#endif
private:
	long fnKeyCheckReturn(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn_A3C01056_FD2D_4800_912C_69683F47B599_)
	{
		ULONG ulBindX;ULONG ulIdentity;ULONG ulKey;BYTE byRes;
		if (FALSE == cIn_A3C01056_FD2D_4800_912C_69683F47B599_.Pop(ulBindX).Pop(ulIdentity).Pop(ulKey).Pop(byRes).IsValid()) return -1;
		long _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_ = m_pcIf->fnKeyCheckReturn(ulBindX,ulIdentity,ulKey,byRes);
		return _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_;
	}

private:
	static _FUNC_T m_apcFunc[__END__];
	_N_IF_T* m_pcIf;
	ULONG m_ulLenRcvBuff;
	const void* m_pRcvBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#endif
};

template <class IF>
typename CLoginToGw<IF>::_FUNC_T CLoginToGw<IF>::m_apcFunc[__END__] = {
	NULL,
	NULL,
	&CLoginToGw<IF>::fnKeyCheckReturn,
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
#define __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__

template <class IF>
class CGwToGame
{
	typedef TYPE_LIST09(BYTE,BYTE*,ULONG,ULONG*,USHORT,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnFetchChannelInfo__ = 10,
		__ENUM_FUNCTION_TYPE_fnFetchChannelInfoWithAsync__ = 11,

		__END__
	};
	typedef IF _N_IF_T;
	typedef long (CGwToGame<_N_IF_T>::*_FUNC_T)(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn);

public:
	CGwToGame(_N_IF_T* pcIf)
		:m_pcIf(pcIf)
	{
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#endif
	}
	virtual ~CGwToGame()
	{
	}
	CGwToGame& operator =(const CGwToGame& cFrom)
	{
		m_pcIf = cFrom.m_pcIf;
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#endif

		return *this;
	}
	long StubDispatch()
	{
		CIn<_OCF_PROXYSTUB_TYPELIST_T> cIn(m_ulLenRcvBuff, m_pRcvBuff);
		USHORT uiCmd;

		if (FALSE == cIn.Pop(uiCmd).IsValid())
		{
			return -2;
		}
		if (uiCmd >= __END__)
		{
			return -3;
		}
		if (NULL == m_apcFunc[uiCmd])
		{
			return -4;
		}
		return (this->*m_apcFunc[uiCmd])(cIn);
	}

public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetStubInfo(ULONG ulLenRcvBuff, const void* pRcvBuff, ULONG ulLenSndBuff = 0, void* pSndBuff = NULL) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }

#else
	inline void SetStubInfo(ULONG ulLenRcvBuff, const void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }

#endif
private:
	long fnFetchChannelInfo(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn_A3C01056_FD2D_4800_912C_69683F47B599_)
	{
		int lLen;_CHANNEL_INFO_T pbyData[MAX_CHANNEL_INPUT];
		if (FALSE == cIn_A3C01056_FD2D_4800_912C_69683F47B599_.IsValid()) return -1;
		long _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_ = m_pcIf->fnFetchChannelInfo(lLen,pbyData);
		if (0 != _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_) return _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_;
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_19DB7D7A_2FBD_49c7_873C_9603A9FC0050_(m_ulLenSndBuff, m_pSndBuff);
		if (FALSE == cTmpOut_19DB7D7A_2FBD_49c7_873C_9603A9FC0050_.Push(static_cast<USHORT>(10)).Push(lLen,pbyData).IsValid()) return -2;
		return m_pcIf->SendResult(cTmpOut_19DB7D7A_2FBD_49c7_873C_9603A9FC0050_.GetDataLength(), cTmpOut_19DB7D7A_2FBD_49c7_873C_9603A9FC0050_.GetStartDataPtr());
	}
	long fnFetchChannelInfoWithAsync(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn_A3C01056_FD2D_4800_912C_69683F47B599_)
	{
		
		long _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_ = m_pcIf->fnFetchChannelInfoWithAsync();
		return _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_;
	}

private:
	static _FUNC_T m_apcFunc[__END__];
	_N_IF_T* m_pcIf;
	ULONG m_ulLenRcvBuff;
	const void* m_pRcvBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#endif
};

template <class IF>
typename CGwToGame<IF>::_FUNC_T CGwToGame<IF>::m_apcFunc[__END__] = {
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	&CGwToGame<IF>::fnFetchChannelInfo,
	&CGwToGame<IF>::fnFetchChannelInfoWithAsync,
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__


template <class IF>
class CGameToGw
{
	typedef TYPE_LIST09(BYTE,BYTE*,ULONG,ULONG*,USHORT,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnFetchChannelInfoReturn__ = 12,

		__END__
	};
	typedef IF _N_IF_T;
	typedef long (CGameToGw<_N_IF_T>::*_FUNC_T)(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn);

public:
	CGameToGw(_N_IF_T* pcIf)
		:m_pcIf(pcIf)
	{
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#endif
	}
	virtual ~CGameToGw()
	{
	}
	CGameToGw& operator =(const CGameToGw& cFrom)
	{
		m_pcIf = cFrom.m_pcIf;
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#endif

		return *this;
	}
	long StubDispatch()
	{
		CIn<_OCF_PROXYSTUB_TYPELIST_T> cIn(m_ulLenRcvBuff, m_pRcvBuff);
		USHORT uiCmd;

		if (FALSE == cIn.Pop(uiCmd).IsValid())
		{
			return -2;
		}
		if (uiCmd >= __END__)
		{
			return -3;
		}
		if (NULL == m_apcFunc[uiCmd])
		{
			return -4;
		}
		return (this->*m_apcFunc[uiCmd])(cIn);
	}

public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetStubInfo(ULONG ulLenRcvBuff, const void* pRcvBuff, ULONG ulLenSndBuff = 0, void* pSndBuff = NULL) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }

#else
	inline void SetStubInfo(ULONG ulLenRcvBuff, const void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }

#endif
private:
	long fnFetchChannelInfoReturn(CIn<_OCF_PROXYSTUB_TYPELIST_T>& cIn_A3C01056_FD2D_4800_912C_69683F47B599_)
	{
		ULONG lLen;BYTE * pbyData;
		if (FALSE == cIn_A3C01056_FD2D_4800_912C_69683F47B599_.Pop(lLen,(const BYTE ** )(&pbyData)).IsValid()) return -1;
		long _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_ = m_pcIf->fnFetchChannelInfoReturn((int )lLen,pbyData);
		return _lRet742173F4_8580_42ce_BF4E_4828036EB6A6_;
	}

private:
	static _FUNC_T m_apcFunc[__END__];
	_N_IF_T* m_pcIf;
	ULONG m_ulLenRcvBuff;
	const void* m_pRcvBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#endif
};

template <class IF>
typename CGameToGw<IF>::_FUNC_T CGameToGw<IF>::m_apcFunc[__END__] = {
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	&CGameToGw<IF>::fnFetchChannelInfoReturn,
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
}
